package com.eco
{
	import com.eco.*;
	import com.framework.*;
	
	import flash.display.MovieClip;
	import flash.events.*;
	import flash.utils.*;
	
	public class BonusMassUp extends Bonus
	{
		private var iNormalMass:int;
		
		public function BonusMassUp()
		{
			super( 8, Bonus.BONUS_MASSUP);
			
			iFunctionTime = 6000;//6秒
		}
		
		override public function StartFunction():void
		{
			if( ftFighter == null )
				return;
			
			CreateSoundEvent( CustomEventSound.PLAY_SOUND, SoundInfo.EFF_BONUS_MASSUP_ACTIVE);
			
			//自己的变量用于保存当前情况下的卫士的状态，用于以后的还原
			iNormalMass = ftFighter.iNormalMass;
			
			ftFighter.iNormalMass *= 10;//常态质量变为10倍，使同样速度下的撞击更为强力
			super.StartFunction();
		}
		
		override public function StopFunction():void
		{
			ftFighter.iNormalMass = iNormalMass;
			
			super.StopFunction();
		}
	}
}